package com.ggs.rg.ybjb.pojomodule.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("t_goods_info")
public class Mater {
    @TableId
    private int pid;
    private String text;
    private Double price;
    private int count;
    private int gid;
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;//数据生成时自动创建时自动
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;//数据生成时自动生成，修改时自动更新
    @Version
    private Integer version;//乐观锁
    @ApiModelProperty(value = "0表示删除,1表示存在,逻辑删除字段")
    @TableLogic
    private Integer deletes;

    public Mater(String text, Double price,
                 int count, int gid) {
        this.text = text;
        this.price = price;
        this.count = count;
        this.gid = gid;
    }

    public Mater(String text, Double price,
                 int count) {
        this.text = text;
        this.price = price;
        this.count = count;
    }

}
